﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using libSyllabus.Model;

namespace libSyllabus.DataModel
{
    /// <summary>
    /// Primary Data Context.
    /// You can consider it as the database I/O provider.
    /// </summary>
    public class MainDataContext : DataContext
    {
        #region Constructors

        public MainDataContext(String connectionString)
            : base(connectionString)
        {
           // if (!DatabaseExists()) CreateDatabase();
        }

        #endregion

        #region Tables

        public Table<SemesterEntity> Semesters;

        public Table<CourseEntity> Courses;

        public Table<SectionEntity> Sections;

        public Table<ClassEntity> Classes;

        public Table<SectionTypeEntity> SectionTypes;

        #endregion
    }
}
